package cn.com.api.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import cn.com.api.entity.ApiNewFindOrder;
import cn.com.api.entity.ApiT_order;

public interface ApiNewFindOrderMapper {

	public void insertOrder(ApiNewFindOrder apiNewFindOrder);

	public void sureOrder(ApiNewFindOrder apiNewFindOrder);

	public Map<String, Object> queryOrderDetail(@Param("rid") String rid);

	public void surePay(ApiNewFindOrder apiNewFindOrder);

	public void insertUserCashRecords(ApiNewFindOrder apiNewFindOrder);

	public void insertCart(ApiNewFindOrder apiNewFindOrder);

	/**
	 * 获取限制人数(因为数据库的字段原因，所以返回String类型)
	 * 
	 * @param discoverId
	 * @return
	 */
	public String queryPersonLimit(@Param("discoverId") String discoverId);

	/**
	 * 获取已参加改活动人数
	 * 
	 * @param discoverId
	 * @return
	 */
	public int queryNumInOrder(@Param("discoverId") String discoverId);

	/**
	 * 添加订单详情信息
	 * 
	 * @param maps
	 */
	public void insertOrderDetail(ApiNewFindOrder apiNewFindOrder);

	public List<ApiT_order> getOrdersList(@Param("map") Map<String, Object> param);

}
